<template>
  <div>
    <div class="header">
      <div class="h-left">
        <span class="iconfont">&#xe625;</span>
      </div>
      <div class="h-center">
        <input placeholder="搜索的内容" type="text" />
      </div>
      <router-link to="/citySelect" tag="span">
        <div class="h-right">{{this.$store.state.city}}</div>
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  // 组件名称
  name: "demo", // 组件参数 接收来自父组件的数据
  props: ["city"],
  components: {},
  data() {
    return {};
  },
  computed: {},
  watch: {},
  methods: {},
  beforeCreate() {},
  created() {},
  beforeMount() {},
  mounted() {}
};
</script> 
<style lang='stylus' scoped>
.header {
  width: 100%;
  height: 0.88rem;
  display: flex;
  align-items: center;
  background: #0088dd;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 0 0.2rem;
}

input {
  width: 5.2rem;
  outline-style: none;
  padding-left: 0.5rem;
  box-sizing: border-box;
  border-radius: 0.6rem;
}
</style>